home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / ubppmpqs.zip / ppmp1.asm < prev    next >
Assembly Source File  |  1993-03-14  |  485b  |  41 lines

  1. ;ppmp1.asm
  2. ;check if A20 line is enable.
  3.  
  4. .286p
  5. code    segment
  6.     assume    cs:code,ds:code
  7.     include    ubp.mac
  8.  
  9.     org    100h
  10. start:
  11.     xor    ax,ax
  12.     mov    ds,ax
  13.     dec    ax
  14.     mov    es,ax
  15.     xor    si,si
  16.     mov    di,0010h
  17.     mov    cx,0200h
  18.     repe    cmpsw
  19.     je    cannotuse
  20.     smsw    ax
  21.     test    al,1
  22.     jnz    virtual86
  23.     xor    ax,ax
  24. outret:
  25.     mov    bx,AR0
  26.     mov    word ptr cs:[bx],ax
  27.     mov    ax,ss
  28.     mov    ds,ax
  29.     mov    es,ax
  30.     retf
  31.  
  32. cannotuse:
  33.     mov    ax,1
  34.     jmp    outret
  35.  
  36. virtual86:
  37.     mov    ax,2
  38.     jmp    outret
  39.  
  40. code    ends
  41. end    start